<ul class="navbar-nav">
    @if (User.Identity.IsAuthenticated)
    {
        <li class="nav-item dropdown">
            <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">@User.Identity.Name<b class="caret"></b></a>
            <div class="dropdown-menu">
                <a class="dropdown-item" asp-route-area="OrchardCore.Admin" asp-controller="Admin" asp-action="Index">@T["Dashboard"]</a>
                <a class="dropdown-item" asp-route-area="OrchardCore.Users" asp-controller="Account" asp-action="ChangePassword">@T["Change Password"]</a>
                <a class="dropdown-item" asp-route-area="OrchardCore.Users" asp-controller="Account" asp-action="ExternalLogins">@T["External Logins"]</a>
                <form class="form-inline" asp-route-area="OrchardCore.Users" asp-controller="Account" asp-action="LogOff" method="post">
                    <button type="submit" class="btn btn-link navbar-btn dropdown-item">@T["Log off"]</button>
                </form>
            </div>
        </li>
    }
    else
    {
        <li class="nav-item"><a class="nav-link" asp-route-area="OrchardCore.Users" asp-controller="Account" asp-action="Login">@T["Log in"]</a></li>
    }
</ul>